Conversation
🦋 Changeset detectedLatest commit: 7664c1e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (930,087 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
egilmorez
left a comment
There was a problem hiding this comment.
Question for you, thanks!
| } | ||
|
|
||
| /** | ||
| * Functions error code string before adding "functions/" product prefix. |
There was a problem hiding this comment.
This makes it sound like the strings come before the prefix -- is that right?
Also, why specifically "product prefix?" Would that mean something like "functions/firestore?"
If we have a staged version of this, that could help me grok it I think.
There was a problem hiding this comment.
Staging it won't add anything that isn't here, unfortunately. Users were reporting that in v8, error codes were coming back as, for example, "deadline-exceeded" (one of the possible strings here) and in v9 they are coming back (more correctly) as "functions/deadline-exceeded" (since this is the functions package). We try to put a prefix with the SDK package name and a "/" before every error thrown by that SDK package. So Firestore should be throwing errors with code "firestore/something", auth should be throwing errors with code "auth/something", etc.
Lines 99-132 below have the main documentation for this code since that's the actual error code (with the prefix added) that users will see.
There was a problem hiding this comment.
Thanks!
So yes, if this is how it works, I'd expect something more like "* Functions error code string following the "functions/" product prefix."
or maybe "* Functions error code string appended after "functions/" product prefix."
WDYT?
There was a problem hiding this comment.
Oh, I see. I've changed it to "appended after".
Add a public
FunctionsErrorCodetype that is prefixed with "functions/" to match the exact strings found inFunctionsError.Code.This uses template literal types which were introduced in Typescript 4.1. This should be ok for most users I hope? 4.1 was released in Nov 2020.
Fixes #6281